package com.vimi8.ebb.api.ebb;

import com.vimi8.ebb.configuration.HttpResponseEntity;
import com.vimi8.ebb.dto.ElectricityBusinessDto;
import com.vimi8.ebb.dto.PlatformBusinessDto;
import com.vimi8.ebb.dto.RegionManamentDto;
import com.vimi8.ebb.model.ApplyRecord;
import com.vimi8.ebb.model.ElectricityBusiness;
import com.vimi8.ebb.model.Paginator;
import com.vimi8.ebb.model.ProductInfo;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by wangyang on 2017/1/18.
 */

@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringCodegen", date = "2016-09-19T10:01:46.405Z")

@Api(value = "ebb", description = "申请记录控制器")
@RestController
public interface ApplyRecordApi {

    @ApiOperation(value = "添加申请记录", notes = "添加申请记录.", response = String.class, tags={ "申请记录(后端)", })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,返回影响行数", response = String.class),
            @ApiResponse(code = 200, message = "失败,返回消息", response = String.class) })
    @RequestMapping(value = "/admin/apply/",
            method = RequestMethod.POST)
    HttpResponseEntity<String> registerApplyRecord(@ApiParam(value = "申请信息.", required = true) @RequestBody ApplyRecord applyRecord
    );

    @ApiOperation(value = "查询申请记录", notes = "查询申请记录.", response = ApplyRecord.class, tags={ "申请记录(后端)", })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,返回影响行数", response = ApplyRecord.class),
            @ApiResponse(code = 200, message = "失败,返回消息", response = String.class) })
    @RequestMapping(value = "/admin/apply/",
            method = RequestMethod.GET)
    HttpResponseEntity<Paginator<List<ApplyRecord>>> getApplyRecordList(
            @ApiParam(value = "页码", required = true) @RequestParam(value = "start", required = true) int start,
            @ApiParam(value = "数据大小", required = true) @RequestParam(value = "size", required = true) int size,
            @ApiParam(value = "审核状态", required = false) @RequestParam(value = "status", required = false) String status,
            @ApiParam(value = "电商名称", required = false) @RequestParam(value = "storeName", required = false) String storeName

    );

    @ApiOperation(value = "修改审核状态", notes = "修改审核状态.", response = String.class, tags={ "申请记录(后端)", })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,返回影响行数", response = String.class),
            @ApiResponse(code = 200, message = "失败,返回消息", response = String.class) })
    @RequestMapping(value = "/admin/apply/",
            method = RequestMethod.PUT)
    HttpResponseEntity<String> updateApplyRecord(
            @ApiParam(value = "修改审核状态", required = true) @RequestBody ApplyRecord applyRecord
    );

    @ApiOperation(value = "删除申请记录", notes = "删除申请记录.", response = String.class, tags={ "申请记录(后端)", })
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "成功,返回影响行数", response = String.class),
            @ApiResponse(code = 200, message = "失败,返回消息", response = String.class) })
    @RequestMapping(value = "/admin/apply/",
            method = RequestMethod.DELETE)
    HttpResponseEntity<String> deleteApplyRecord(
            @ApiParam(value = "id", required = true) @RequestParam(value = "id", required = true) String id
    );


}
